package com.aspose.cells;

class zbxk extends zcdb {
   zbxk() {
      this.d = 463;
   }

   void a(FormatCondition var1) throws Exception {
      int var2 = 42;
      Object var3 = null;
      Object var4 = null;
      int var5 = var1.getType();
      byte[] var11 = var1.a();
      byte[] var12 = var1.c();
      Object var6 = null;
      String var7 = var1.getText();
      if (var11 != null) {
         var2 += var11.length;
      }

      if (var12 != null) {
         var2 += var12.length;
      }

      if (var6 != null) {
         var2 += ((Object[])var6).length;
      }

      if (var7 != null) {
         var2 += 4 + var7.length() * 2;
      } else {
         var2 += 4;
      }

      this.c = new byte[var2];
      label99:
      switch(var5) {
      case 0:
         this.c[0] = 1;
         this.c[4] = 0;
         this.c[16] = (byte)zcee.b(var1.getOperator());
         break;
      case 1:
         this.c[0] = 2;
         this.c[4] = 0;
         break;
      case 2:
         this.c[0] = 3;
         this.c[4] = 2;
         break;
      case 3:
         this.c[0] = 4;
         this.c[4] = 3;
         break;
      case 4:
         this.c[0] = 6;
         this.c[4] = 4;
         break;
      case 5:
         this.c[0] = 5;
         this.c[4] = 5;
         this.c[16] = (byte)var1.getTop10().getRank();
         break;
      case 6:
         this.c[0] = 2;
         this.c[4] = 7;
         break;
      case 7:
         this.c[0] = 2;
         this.c[4] = 27;
         break;
      case 8:
         this.c[0] = 2;
         this.c[4] = 8;
         this.c[16] = 0;
         break;
      case 9:
         this.c[0] = 2;
         this.c[4] = 8;
         this.c[16] = 1;
         break;
      case 10:
         this.c[0] = 2;
         this.c[4] = 8;
         this.c[16] = 2;
         break;
      case 11:
         this.c[0] = 2;
         this.c[4] = 8;
         this.c[16] = 3;
         break;
      case 12:
         this.c[0] = 2;
         this.c[4] = 9;
         break;
      case 13:
         this.c[0] = 2;
         this.c[4] = 10;
         break;
      case 14:
         this.c[0] = 2;
         this.c[4] = 11;
         break;
      case 15:
         this.c[0] = 2;
         this.c[4] = 12;
         break;
      case 16:
         switch(var1.getTimePeriod()) {
         case 0:
            this.c[0] = 2;
            this.c[4] = 15;
            break label99;
         case 1:
            this.c[0] = 2;
            this.c[4] = 17;
            break label99;
         case 2:
            this.c[0] = 2;
            this.c[4] = 16;
            break label99;
         case 3:
            this.c[0] = 2;
            this.c[4] = 18;
            break label99;
         case 4:
            this.c[0] = 2;
            this.c[4] = 24;
            break label99;
         case 5:
            this.c[0] = 2;
            this.c[4] = 19;
            break label99;
         case 6:
            this.c[0] = 2;
            this.c[4] = 20;
            break label99;
         case 7:
            this.c[0] = 2;
            this.c[4] = 21;
            break label99;
         case 8:
            this.c[0] = 2;
            this.c[4] = 23;
            break label99;
         case 9:
            this.c[0] = 2;
            this.c[4] = 22;
            break label99;
         default:
            this.c[0] = 2;
            this.c[4] = 15;
            break label99;
         }
      case 17:
         AboveAverage var8 = var1.getAboveAverage();
         System.arraycopy(com.aspose.cells.b.a.zc.a(var8.getStdDev()), 0, this.c, 16, 4);
         if (var8.isAboveAverage()) {
            if (var8.isEqualAverage()) {
               this.c[0] = 2;
               this.c[4] = 29;
            } else {
               this.c[0] = 2;
               this.c[4] = 25;
            }
         } else if (var8.isEqualAverage()) {
            this.c[0] = 2;
            this.c[4] = 30;
         } else {
            this.c[0] = 2;
            this.c[4] = 26;
         }
      }

      System.arraycopy(com.aspose.cells.b.a.zc.a(var1.d()), 0, this.c, 8, 4);
      System.arraycopy(com.aspose.cells.b.a.zc.a(var1.getPriority()), 0, this.c, 12, 4);
      byte var13 = 0;
      if (var1.getStopIfTrue()) {
         var13 = (byte)(var13 | 2);
      }

      if (var1.getTop10() != null && var1.getTop10().isBottom()) {
         var13 = (byte)(var13 | 8);
      }

      if (var1.getTop10() != null && var1.getTop10().isPercent()) {
         var13 = (byte)(var13 | 16);
      }

      this.c[28] = var13;
      if (var11 != null) {
         System.arraycopy(var11, 0, this.c, 30, 4);
      }

      if (var12 != null) {
         System.arraycopy(var12, 0, this.c, 34, 4);
      }

      if (var6 != null) {
         System.arraycopy(var6, 0, this.c, 38, 4);
      }

      byte var9 = 42;
      int var14;
      if (var7 != null) {
         var14 = zcch.a(this.c, var9, var7);
      } else {
         byte[] var10 = new byte[]{-1, -1, -1, -1};
         System.arraycopy(var10, 0, this.c, var9, 4);
         var14 = var9 + 4;
      }

      if (var11 != null) {
         System.arraycopy(var11, 0, this.c, var14, var11.length);
         var14 += var11.length;
      }

      if (var12 != null) {
         System.arraycopy(var12, 0, this.c, var14, var12.length);
         var14 += var12.length;
      }

      if (var6 != null) {
         System.arraycopy(var6, 0, this.c, var14, ((Object[])var6).length);
         int var10000 = var14 + ((Object[])var6).length;
      }

   }
}
